<?php
/**
 * @package WordPress
 * @subpackage Default_Theme
 */

// Do not delete these lines
	if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
		die ('Please do not load this page directly. Thanks!');

	if ( post_password_required() ) { ?>
		<p class="nocomments">This post is password protected. Enter the password to view comments.</p>
	<?php
		return;
	}
?>

<div class="opiniones">
		<div class="num_opiniones"><?php comments_number('0', '1', '%' );?></div>
		<div class="info_opiniones fleft">
			<h2>
						Opiniones
			  </h2>
              </div>
              
<div class="recordatorio_opiniones fright">
<strong>
		Para opinar en esta nota usted debe ser un usuario registrado.
		<?php if (isset($user_login)){ ?>
			Puede escribir sus comentarios <a href="#comment" class="bt_ingreso">aqu&iacute;</a>
		<?php }else{ ?>
			<a href="http://caracoltv.com/user/register?destination=<? echo $_SERVER['SCRIPT_URI'];?>">Reg&iacute;strese</a> o ingrese <a href="#inicio" onClick="return overlay2(this, 'subcontent')" >aqu&iacute;</a>
		<?php }?>
		
		</strong>

Este es un espacio para la construcci&oacute;n de ideas y la generaci&oacute;n de opini&oacute;n.
<br>
Este espacio busca crear un foro constructivo de convivencia y reflexi&oacute;n, no un escenario de ataques al pensamiento contrario.
</div>
<div class="clear"></div>
		
<?php if ( have_comments() ) : ?>
        	
		 
		 
		
	
<!-- navegacion de los formularios-->
<!--	<div class="navigation">
		<div class="alignleft"><?php /*previous_comments_link() ?></div>
		<div class="alignright"><?php next_comments_link() */?></div>
	</div>-->
<!-- navegacion de los formularios-->
	<?php wp_list_comments( array( 'callback' => 'elespectador_comment' )); ?>
	<!--<ul class="commentlist">
	<?php //wp_list_comments(); ?>
	</ul>-->
<!--	<div class="navigation">
		<div class="alignleft"><?php /*previous_comments_link() ?></div>
		<div class="alignright"><?php next_comments_link() */?></div>
	</div>-->
	<div class="paginacionbus">
		<ul>
			<li><?php previous_comments_link() ?></li>
			<li><?php next_comments_link() ?></li>
		</ul>
	</div>
 <?php else : // this is displayed if there are no comments so far ?>
	<?php if ('open' == $post->comment_status) : ?>
		<!-- If comments are open, but there are no comments. -->
	 <?php else : // comments are closed ?>
		<!-- If comments are closed. -->
		<p class="nocomments">Comments are closed.</p>
	<?php endif; ?>
<?php endif; ?>



<?php if ( $user_ID ) : ?>
<?php if ('open' == $post->comment_status) : ?>

<div class="campo_opiniones">
	
		
	<div class="form_opinion">
    <h2>&#161;Escriba aqu&iacute; su opini&oacute;n&#33;</h2>
	
<!--	<div class="cancel-comment-reply">
		<small><?php //cancel_comment_reply_link(); ?></small>
	</div>-->
	<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
	<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>
	<?php else : ?>
			<?php if ( $user_ID ) : ?>
			<h4>Opini&oacute;n por: <span><strong><?php $current_user = wp_get_current_user(); echo $current_user->user_login; ?>.</strong> </span></h4><!--<a href="<?php //echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out &raquo;</a>-->
		<?php else : ?>
			<p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
			<label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label></p>
			<p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
			<label for="email"><small>Mail (will not be published) <?php if ($req) echo "(required)"; ?></small></label></p>
			<!--<h3><?php //comment_form_title( '&#161;Escriba aqu&iacute; su opini&oacute;n&#33;', 'Leave a Reply to %s' ); ?></h3>-->
			<p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
				<label for="url"><small>Website</small></label></p>
		<?php endif; ?>
		<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
		 <div>
		<div class="form-item">  </div>
		<div class="form-item">  
				<!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php //echo allowed_tags(); ?></code></small></p>-->				
                
				<div class="content_textarea fleft"><textarea id="edit-comment" class="text_comentario" onmousedown="javascript: limitClickRigth(event);" onkeyup="javascript: return limitText(this);" onkeydown="javascript: return limitCTRV(this,event)" name="comment"  cols="50" rows="10" tabindex="4" class="text_comentario"></textarea></div>
                <input id="caracter" type="text" readonly="yes" value="800" name="caracter"/>
				<ul class="list_info">
					<h3>Normas de uso</h3> </li>
					<li>Esta es la opini&oacute;n de los internautas, no de CARACOLTV.com</li>
					<li>Este es un espacio para la construcci&oacute;n de opiniones, no para la destrucci&oacute;n caprichosa de opiniones</li>
					<li>CARACOLTV.com se reserva el derecho de permanencia de opiniones en el portal</li>
				</ul>
		
				
				
		</div>
		<?php comment_id_fields(); ?>

<?php do_action('comment_form', $post->ID); ?>
		</div>
		<div class="clear"></div>
        <input name="submit" type="submit" class="bt_form"  id="submit" tabindex="5" value="Comentar" />
        </form>
	</div>
<?php endif; // If registration required and not logged in ?>
 	
</div>

<?php endif; ?>
<?php endif; // if you delete this the sky will fall on your head ?>
</div>
